<template>
   <div class="swiper">
      <el-carousel
         v-if="swiper.length"
         :interval="3000"
         arrow="never"
         height="500px"
      >
         <el-carousel-item v-for="(item,index) in swiper" :key="index">
            <div>
               <img :src="item" alt="">
            </div>
         </el-carousel-item>
      </el-carousel>
      <div>

      </div>
   </div>
</template>

<script>
   export default {
      name: 'swiper',
      data() {
         return {
            swiper: []
         }
      },
      async created() {
         let swiperData = await this.$axios.get('/apis/home/swiper', {
            params: {
               name: 'swipe'
            }
         })
         this.swiper = swiperData.data.result.dataUrl
      }
   }
</script>

<style scoped lang="stylus">
   .swiper,img
      width 100%
      height 500px
</style>
